package cn.lingyangwl.agile.infra.dict.service.impl;

import cn.lingyangwl.agile.infra.module.dict.DictItemApi;
import cn.lingyangwl.agile.infra.module.dict.model.entity.DictItem;
import cn.lingyangwl.agile.infra.dict.service.DictItemService;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author shenguangyang
 */
@Primary
@Service
public class DictItemApiImpl implements DictItemApi {
    @Resource
    private DictItemService dictItemService;

    @Override
    public Map<String, Map<String, DictItem>> listByTypes(List<String> codes) {
        return dictItemService.listByTypes(codes);
    }

    @Override
    public DictItem getDictItem(String dictType, String code) {
        return dictItemService.getDictItem(dictType, code);
    }

    @Override
    public List<DictItem> listDictItem(String dictType) {
        return dictItemService.listByType(dictType);
    }
}
